package combat;

/**
 * Context for handling strategies developed for conflicts
 * @author Chris
 *
 */
public class ConflictContext {

	ConflictStrategy strat;
	Sprite enemy;
	Bullet bullet;
	
	/**
	 * Constructor sets values for Context
	 * @param strat Strategy concreteclass to be used
	 * @param enemy Sprite that is being conflicted with
	 * @param bullet Bullet being shot
	 */
	public ConflictContext(ConflictStrategy strat, Sprite enemy, Bullet bullet){
		this.strat = strat;
		this.enemy = enemy;
		this.bullet = bullet;
	}
	
	/**
	 * Calls execute method in selected concreteStrategy
	 * @param enemy Sprite being conflited with
	 */
	public void execute(Sprite enemy){
		strat.execute(enemy, bullet);
	}
}
